<?php

class Article_category_to {

	private $number;
	private $title;
	private $description;
	private $autor_login;
	private $ranking;
	
	public function __construct($number, $title, $description, 
									$autor_login, $ranking) {
		$this->number = $number;
		$this->title = $title;
		$this->description = $description;
		$this->autor_login = $autor_login;
		$this->ranking = $ranking;		
	}
	
	public function get_number() {
		return $this->number;
	}
	
	public function get_title() {
		return $this->title;
	}

	public function get_description() {
		return $this->description;		
	}
	
	public function set_description($description) {
		$this->description = $description; 
	}
	
	public function get_autor_login() {
		return $this->autor_login;
	}
	
	public function get_ranking() {
		return $this->ranking; 
	}
	
	public function set_ranking($ranking) {
		$this->ranking = $ranking;
	}
	
	public function equals($object) {
		if ((get_class($this) != get_class($object)) ||
				($object == null))				
			 return false;
		else {
			if (($this->number == $object->get_number()) &&
				($this->title == $object->get_title()) &&
				($this->description == $object->get_description()) &&
				($this->autor_login == $object->get_autor_login()) &&
				($this->ranking == $object->get_ranking()))
				return true;
			return false;
		}
	}
	
	public function to_string() {
		return 'number: ' . $this->number . ' | ' .
				'title: ' . $this->title . ' | ' .
				'description: ' . $this->description . ' | ' .
				'autor_login: ' . $this->autor_login . ' | ' .
				'ranking: ' . $this->ranking;
	}
}
?>